<load target="filter/update_menu_title.xml" />
<load target="filter/insert_menu_item.xml" />
<load target="filter/delete_menu_item.xml" />
<load target="filter/move_menu_item.xml" />

<load target="js/menu_admin.js" type="body" />
<load target="js/menu_tree.js" type="body" />

<!--// tree javascript plugin load -->
<!--%load_js_plugin("ui.tree")-->

<script type="text/javascript">
    var alertImageOnly = "{$lang->alert_image_only}";
</script>

<div class="menuManagement">

    <!--@if($module == 'admin')-->
        <form action="./" method="get" onsubmit="return procFilter(this, update_menu_title)">
        <input type="hidden" name="menu_srl" value="{$menu_info->menu_srl}" />
            <h4 class="xeAdmin">{$lang->menu_management}</h4>
            <table cellspacing="0" class="rowTable">
            <tr>
                <th scope="col"><div>{$lang->title}</div></th>
                <td>
                    <div class="fl">
                        <input type="text" name="title" value="{$menu_info->title}" class="inputTypeText" />
                    </div>
                    <div class="fr">
                        <span class="button"><input type="submit" value="{$lang->cmd_modify}" /></span>
                    </div>
                </td>
            </tr>
            <tr>
                <th scope="col"><div>{$lang->menu_management}</div></th>
                <td class="left">{nl2br($lang->about_menu_management)}
<span style="float:right"><a href="#" onclick="doReloadTreeMenu('{$menu_info->menu_srl}');return false;" class="button"><span>{$lang->cmd_remake_cache}</span></a></span>
                </td>
            </tr>
            </table>
        </form>

    <!--@else-->
        <table cellspacing="0" class="rowTable">
        <tr>
            <th scope="col"><div>{$lang->title}</div></th>
            <td class="left">
                {$menu_info->title}
            </td>
        </tr>
        <tr>
            <th scope="col"><div>{$lang->menu_management}</div></th>
            <td class="left">{nl2br($lang->about_menu_management)}</td>
        </tr>
        </table>
    <!--@end-->


    <div class="gap1">
        <form id="fo_menu" action="./" method="post" onsubmit="return procFilter(this, insert_menu_item)" class="clear" target="tmp_upload_iframe" enctype="multipart/form-data">
        <input type="hidden" name="title" value="{$menu_info->title}" />
        <input type="hidden" name="menu_srl" value="{$menu_info->menu_srl}" />
        <input type="hidden" name="xml_file" value="{$menu_info->xml_file}" />
        <input type="hidden" name="php_file" value="{$menu_info->php_file}" />
        <input type="hidden" name="module" value="menu" />
        <input type="hidden" name="act" value="" />
        <input type="hidden" name="target" value="" />
        <div id="menu_zone_info"></div>
        </form>
        <div id="menu">
            <ul class="simpleTree">
                <li class="root" id='tree_0'><span>{$lang->menu}</span></li>
            </ul>
        </div>
    </div>
</div>

<iframe id='tmp_upload_iframe' name='tmp_upload_iframe' style='display:none;width:1px;height:1px;position:absolute;top:-10px;left:-10px'></iframe>


<script type="text/javascript">//<![CDATA[
//언어파일 로드용
var lang_cmd_insert = "{htmlspecialchars($lang->cmd_insert)}";
var lang_cmd_delete = "{htmlspecialchars($lang->cmd_delete)}";
var lang_cmd_modify = "{htmlspecialchars($lang->cmd_modify)}";

var simpleTreeCollection;
var max_menu_depth = 999;
var xml_url = "{$menu_info->xml_file}";
var lang_confirm_delete = "{$lang->confirm_delete}";
jQuery(function(){
	doMoveMenuInfo();
	Tree(xml_url);
});
//]]>
</script>
